import request from '@/utils/request'

// 查询知识库列表
export function listAiKnowledge(query) {
    return request({
        url: '/ai/knowledge/list',
        method: 'post',
        data: query
    })
}

// 查询知识库详细
export function getAiKnowledge(id) {
    return request({
        url: '/ai/knowledge/detail/' + id,
        method: 'get'
    })
}

// 新增知识库
export function addAiKnowledge(data) {
    return request({
        url: '/ai/knowledge/save',
        method: 'post',
        data: data
    })
}

// 修改知识库
export function updateAiKnowledge(data) {
    return request({
        url: '/ai/knowledge/update',
        method: 'put',
        data: data
    })
}

// 删除知识库
export function delAiKnowledge(id) {
    return request({
        url: '/ai/knowledge/remove/' + id,
        method: 'delete'
    })
}

export function listAllCompleteKnowledge() {
    return request({
        url: '/ai/knowledge/listAll',
        method: 'get'
    })
}
